

public class Cane {
	private final String name;
	
	public Cane(String name) {
		this.name = name;
	}
	
	public Cane() {
		this("Eva");
	}
	
	public String toString() {
		return String.format("Il cane si chiama %s", this.name);
	}
	
	
	public static void main(String[] args) {
		Cane eva = new Cane();
		System.out.println(eva);
		
		Cane dog = null;
		if(args.length == 1) {
			dog = new Cane("Dog");
		}
		System.out.println(dog);
		
		Cane rocky = new Cane("Rocky");
		System.out.println(rocky);
	}
}
